import CardStackStyleInterpolator from 'react-navigation/src/views/CardStack/CardStackStyleInterpolator'
import {  Animated, Easing, } from 'react-native'
export default {
    initialRouteName: 'Home',
    headerMode: 'none',
    mode: 'modal',
    transitionConfig: () => ({
        transitionSpec: {
            duration: 300,
            easing: Easing.out(Easing.poly(4)),
            timing: Animated.timing,
        },
        screenInterpolator: sceneProps => {
            const { scene } = sceneProps
            const { route } = scene
            const params = route.params || {}
            const transition = params.transition || 'forFade'

            // if (transition === 'forVertical') {
            //     console.log('forVertical')
            //     const { layout, position } = sceneProps
            //     const { index } = scene

            //     const height = layout.initHeight
            //     const translateY = position.interpolate({
            //         inputRange: [index - 1, index, index + 1],
            //         outputRange: [height, 0, 0],
            //     })

            //     const opacity = position.interpolate({
            //         inputRange: [index - 1, index - 0.99, index],
            //         outputRange: [0, 1, 1],
            //     })

            //     return { opacity, transform: [{ translateY }] }
            // } else {
            return CardStackStyleInterpolator[transition](sceneProps)
            // }

        },
    }),
}
